package org.fnzn.web.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.fnzn.core.Result;
import org.fnzn.service.device.PadDeviceService;
import org.fnzn.util.ResultGenerator;

import lombok.extern.slf4j.Slf4j;

@RestController
@RequestMapping("/admin")
@Slf4j
public class AdminSysConstroller {
	@Autowired
	private PadDeviceService padDeviceService;
	@GetMapping(value = "/device/{deviceId}")
	public Result findPad(@PathVariable String deviceId){		
		log.info("查询设备：设备id{}",deviceId);
		return ResultGenerator.genSuccessResult(padDeviceService.findById(deviceId));
	}

}
